package main;

import java.util.ArrayList;
import java.util.Iterator;

//Nikolas Wolfe
//4/13/09
//CIS 4930
//Game of Life 2

/* =============================================================================
* Stores a list of Strings and either prints them out in order or returns
* an iterator
*/
public class StatService
{
	private final ArrayList<String> statistics;
	
	public StatService()
	{
		this.statistics = new ArrayList<String>();
	}
	
	public void register( String s )
	{
		statistics.add( s );
	}
	
	public void printReport()
	{
		Iterator<String> i = statistics.iterator();
		while( i.hasNext() )
		{
			System.out.println(i.next());
		}
	}
	
	public Iterator<String> getStringIterator()
	{
		return statistics.iterator();
	}
}
